<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>{% block title %}今天吃啥呢{% endblock %}</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
    {% load static %}
    <link rel="icon" href="{% static 'favicon.ico' %}">  <!-- 可选：添加 favicon -->
</head>
<body>

<nav class="navbar navbar-expand-lg navbar-dark bg-primary shadow-sm">
    <div class="container">
        <a class="navbar-brand" href="{% url 'index' %}">🍽 今天吃啥呢</a>

        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
                aria-controls="navbarNav" aria-expanded="false" aria-label="切换导航">
            <span class="navbar-toggler-icon"></span>
        </button>

        <div class="collapse navbar-collapse justify-content-end" id="navbarNav">
            <ul class="navbar-nav">
                <li class="nav-item">
                    <a class="nav-link" href="{% url 'index' %}">🏠 首页</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="{% url 'add_recipe' %}">➕ 添加菜谱</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="{% url 'manage_tags' %}">🏷️ 标签管理</a>
                </li>
                
                 <li class="nav-item">
                    <a class="nav-link" href="{% url 'manage_categories' %}">🏷️ 分类管理</a>
                </li>
            </ul>
        </div>
    </div>
</nav>

{% load crispy_forms_tags %}
<div class="container-lg py-3">
    {% block content %}{% endblock %}
</div>

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
